/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.customer.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import javax.validation.constraints.NotNull;
import java.util.List;
import com.google.common.collect.Lists;

import com.jeeplus.core.persistence.TreeEntity;

/**
 * 客户信息Entity
 * @author 卢经纬
 * @version 2018-06-29
 */
public class CustomerInformation extends TreeEntity<CustomerInformation> {
	
	private static final long serialVersionUID = 1L;
	private String superiorUnit;		// 上级单位
	private String address;		// 地址
	private String region;		// 区域
	
	private List<CustomerContact> customerContactList = Lists.newArrayList();		// 子表列表
	
	public CustomerInformation() {
		super();
	}

	public CustomerInformation(String id){
		super(id);
	}

	public String getSuperiorUnit() {
		return superiorUnit;
	}

	public void setSuperiorUnit(String superiorUnit) {
		this.superiorUnit = superiorUnit;
	}
	
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	public String getRegion() {
		return region;
	}

	public void setRegion(String region) {
		this.region = region;
	}
	
	public  CustomerInformation getParent() {
			return parent;
	}
	
	@Override
	public void setParent(CustomerInformation parent) {
		this.parent = parent;
		
	}
	
	public List<CustomerContact> getCustomerContactList() {
		return customerContactList;
	}

	public void setCustomerContactList(List<CustomerContact> customerContactList) {
		this.customerContactList = customerContactList;
	}
	public String getParentId() {
		return parent != null && parent.getId() != null ? parent.getId() : "0";
	}
}